package com.example.myapplication;

import android.content.Context;
import android.view.View;
import android.widget.Toast;

public class pagerOnClickListener implements View.OnClickListener {

    Context mContext;
    public pagerOnClickListener(Context mContext)
    {
        this.mContext=mContext;
    }

    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
            case R.id.paper_img1:
                Toast.makeText(mContext,"图一被点击",Toast.LENGTH_SHORT).show();
                break;
            case R.id.paper_img2:
                Toast.makeText(mContext,"图二被点击",Toast.LENGTH_SHORT).show();
                break;
            case R.id.paper_img3:
                Toast.makeText(mContext,"图三被点击",Toast.LENGTH_SHORT).show();
                break;
            case R.id.paper_img4:
                Toast.makeText(mContext,"图四被点击",Toast.LENGTH_SHORT).show();
                break;
            case R.id.paper_img5:
                Toast.makeText(mContext,"图五被点击",Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
